import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建日期',
    align: "center",
    dataIndex: 'createTime',
    resizable:true
  },
  {
    title: '操作人员',
    align: "center",
    dataIndex: 'userid_dictText',
    resizable:true
  },
  {
    title: '包材',
    align: "center",
    dataIndex: 'packagingId_dictText',
    resizable:true
  },
  {
    title: '工厂',
    align: "center",
    dataIndex: 'factoryId_dictText',
    resizable:true
  },
  {
    title: '操作',
    align: "center",
    dataIndex: 'packagingType_dictText',
    resizable:true
  },
  {
    title: '新增/减少',
    align: "center",
    dataIndex: 'type_dictText',
    resizable:true
  },
  {
    title: '原数量',
    align: "center",
    sorter: true,
    dataIndex: 'originalNum',
    resizable:true
  },
  {
    title: '操作数量',
    align: "center",
    sorter: true,
    dataIndex: 'num',
    resizable:true
  },
  {
    title: '操作后数量',
    align: "center",
    sorter: true,
    dataIndex: 'availableNum',
    resizable:true
  },


  {
    title: '操作详情',
    align: "center",
    dataIndex: 'caption',
    resizable:true
  }


];

// 高级查询数据
export const superQuerySchema = {
  createTime: {title: '创建日期',order: 0,view: 'datetime', type: 'string',},
  userid: {title: '操作人员',order: 1,view: 'list', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'realname',},
  type: {title: '操作类型',order: 2,view: 'number', type: 'number',dictCode: 'add_deductions',},
  packagingType: {title: '操作说明',order: 3,view: 'number', type: 'number',dictCode: 'PackagingType',},
  num: {title: '数量',order: 4,view: 'number', type: 'number',},
  caption: {title: '操作说明详情',order: 5,view: 'textarea', type: 'string',},
  originalNum: {title: '源数量',order: 6,view: 'text', type: 'string',},
  packagingId: {title: '包材',order: 7,view: 'list', type: 'string',dictTable: "p_packaging", dictCode: 'id', dictText: 'name',},
};
